package com.ytjj.qmyx.users.model.entity;

import com.ytjj.common.enums.ScoreSourceEnum;
import lombok.Data;

/**
 *
 *  *
 **/
@Data
public class UserScore {

    private Integer id;

    private Integer score;

    private Integer addSubScore;

    private Integer newScore;

    private String type;

    private ScoreSourceEnum source;

    private Integer uniqueId;

    public void addScore(ScoreSourceEnum source) {
        this.type = "ADD";
        this.source = source;
        this.addSubScore = source.getScore();
        this.newScore = this.score + source.getScore();
    }
}
